package designMode.iteratorPattern;

/**
 * @author LIBOFEI
 * @ClassName MenuItem
 * @description 菜单实体类  迭代器设计模式
 * @date 2020/6/26 15:59
 * @Version 1.0
 **/
public class MenuItem {

    private String name;
    private String description;
    private boolean vegetarian;
    private double price;

    public MenuItem(String name,String description,boolean vegetarian,double price){
        this.name = name;
        this.description = description;
        this.vegetarian = vegetarian;
        this.price = price;
    }

    public void getName(String name) {
        this.name = name;
    }
    public void getDescription(String description) {
        this.description = description;
    }
    public void getPrice(double price) {
        this.price = price;
    }
    public void getVegetarian(boolean vegetarian) {
        this.vegetarian = vegetarian;
    }

    @Override
    public String toString() {
        return "MenuItem{" +
                "name='" + name + '\'' +
                ", description='" + description + '\'' +
                ", vegetarian=" + vegetarian +
                ", price=" + price +
                '}';
    }
}
